HAL OPAMP control function migration ¶
This section provides information about the HAL OPAMP control function migration.
Gets the trim offset value. ¶
|
HAL1 |
HAL2 |
|---|---|
uint32_t HAL_OPAMP_GetTrimOffset (OPAMP_HandleTypeDef *hopamp,
uint32_t trimmingoffset)
|
void HAL_OPAMP_GetConfigTrimming(const hal_opamp_handle_t *hopamp,
hal_opamp_trimming_offset_pair_t *p_config,
hal_opamp_power_mode_t power_mode);
|
|
Usage example: // Get the offset trimming value (PMOS)
uint32_t p_value = HAL_OPAMP_GetTrimOffset(OPAMP1,OPAMP_FACTORYTRIMMING_P);
// Get the offset trimming value (NMOS)
uint32_t n_value = HAL_OPAMP_GetTrimOffset(OPAMP1,OPAMP_FACTORYTRIMMING_N);
|
Usage example: hal_opamp_trimming_offset_pair_t p_config;
// Get the offset trimming value (PMOS & NMOS)
HAL_OPAMP_GetConfigTrimming(OPAMP1,&p_config,HAL_OPAMP_POWER_MODE_NORMAL);
uint32_t p_value = p_config.trim_offset_p;
uint32_t n_value = p_config.trim_offset_n;
|
Related concepts: Other HAL OPAMP changes